package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.AppointmentTime;
import tech.aistar.mapper.AgentMapper;
import tech.aistar.mapper.AppointmentTimeMapper;
import tech.aistar.service.IAppointmentTimeService;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: shuaiguo
 * @Date: 2020/10/01/17:40
 * @Description:
 */
@Service
public class AppointmentTimeImpl implements IAppointmentTimeService {
    @Autowired
    private AppointmentTimeMapper appointmentTimeMapper;
    @Override
    public List<AppointmentTime> selectAll() {

        return appointmentTimeMapper.selectAll();
    }

    @Override
    public void insert(AppointmentTime appointmentTime) {
        appointmentTimeMapper.insert(appointmentTime);
    }

    @Override
    public void updateByPrimaryKey(AppointmentTime appointmentTime) {
        appointmentTimeMapper.updateByPrimaryKey(appointmentTime);
    }

    @Override
    public void deleteByPrimaryKey(Integer id) {
        appointmentTimeMapper.deleteByPrimaryKey(id);
    }

    @Override
    public AppointmentTime findById(Integer integer) {
        return appointmentTimeMapper.findById(integer);
    }

    @Override

    public AppointmentTime findTimeById(Integer integer) {
        return appointmentTimeMapper.findTimeById(integer);
    }
    @Override
    public List<AppointmentTime> selectByTenantId(Integer tenantId) {
        return appointmentTimeMapper.selectByTenantId(tenantId);
    }

    @Override
    public int deleteById(Integer id) {
        return appointmentTimeMapper.deleteById(id);
    }

    @Override
    public List<AppointmentTime> selectAgentByAppointmentDate(Date appointmentDate, Integer agentId) {
        return appointmentTimeMapper.selectAgentByAppointmentDate(appointmentDate,agentId);
    }

    @Override
    public AppointmentTime findByhouseId(Integer integer) {
        return appointmentTimeMapper.findByhouseId(integer);
    }

    //    @Override
//    public List<AppointmentTime> selectByAppointmentDate(Date appointmentDate,Integer agentId) {
//        return appointmentTimeMapper.selectByAppointmentDate(appointmentDate,agentId);
//    }
    @Override
    public AppointmentTime selectByAppointmentDate(Date appointmentDate,String timeQuantum,Integer agentId) {
        return appointmentTimeMapper.selectByAppointmentDate(appointmentDate,timeQuantum,agentId);
    }

    @Override
    public AppointmentTime selectByAppointmentDates(Date appointmentDate, String timeQuantum, Integer tenantId) {
        return appointmentTimeMapper.selectByAppointmentDates(appointmentDate,timeQuantum,tenantId);
    }

    @Override
    public AppointmentTime selectById(Integer id) {
        return appointmentTimeMapper.selectById(id);
    }

    @Override
    public int updateById(Date appointmentDate, String timeQuantum, Integer id) {
        return appointmentTimeMapper.updateById(appointmentDate,timeQuantum,id);

    }

    @Override
    public List<AppointmentTime> selectByAgentId(Integer agentId) {
        return appointmentTimeMapper.selectByAgentId(agentId);
    }

    @Override
    public int updateStateById(Integer id) {
        return appointmentTimeMapper.updateStateById(id);
    }

    @Override
    public int updateStatefById(Integer id) {
        return appointmentTimeMapper.updateStatefById(id);
    }
}
